package com.leetcode.practice.code;

/**
 * @author admin
 */
public class MultiExtendsTest {
    interface TestInter{
        void printValueA(int val);
    }

    class TestInterImpl implements TestInter{

        @Override
        public void printValueA(int val) {
            System.out.println("int:"+val);
        }
    }

    interface TestInterAnother{
        void printValueA(String val);
    }

    class TestInterAnotherImpl implements TestInterAnother{

        @Override
        public void printValueA(String val) {
            System.out.println("String:"+val);
        }
    }

    interface Inter extends TestInter,TestInterAnother{

    }

    static class Demo implements Inter{

        @Override
        public void printValueA(int val) {
            System.out.println("demoInt:"+val);
        }

        @Override
        public void printValueA(String val) {
            System.out.println("demoString:"+val);
        }
    }

    public static void main(String[] args) {
        Inter i = new Demo();
        i.printValueA(2);
        i.printValueA("2");
    }
}
